-- ----------------------------
--        `status`      char(1)      NOT NULL DEFAULT 0 COMMENT '状态（0正常 1停用）',
--        `order_no` int NOT NULL DEFAULT 0 COMMENT '排序',
--        `pinyin_code` varchar(32)   DEFAULT NULL COMMENT '拼音码',
--        `wubi_code` varchar(32)   DEFAULT NULL COMMENT '五笔码',
--        `create_by` varchar(32)   DEFAULT NULL COMMENT '创建人',
--        `create_at` datetime DEFAULT NULL COMMENT '创建时间',
--        `update_by` varchar(32)   DEFAULT NULL COMMENT '修改人',
--        `update_at` datetime DEFAULT NULL COMMENT '修改时间',
--        `delete_flag` char(1)   DEFAULT 0 COMMENT '删除状态',
--        `tenant_id` varchar(32)   DEFAULT '0' COMMENT '租户ID',
-- ----------------------------

CREATE database if NOT EXISTS `e_admin` DEFAULT character set utf8mb4 collate utf8mb4_general_ci;
use `e_admin`;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

DROP TABLE IF EXISTS sys_user_menu;
create table sys_user_menu
(
  user_id   varchar(32)             not null comment '用户id',
  menu_id   varchar(32)             not null comment '菜单ID',
  tenant_id varchar(32) default '0' not null comment '租户id',
  primary key (user_id, menu_id)
)
  comment '用户菜单表' collate = utf8mb4_bin;

-- ----------------------------
-- Table structure for sys_tenant
-- ----------------------------
DROP TABLE IF EXISTS sys_tenant;
create table sys_tenant
(
  tenant_id              varchar(32)            not null comment '租户id'
    primary key,
  tenant_name            varchar(32)            not null comment '租户名称',
  tenant_code            varchar(32)            not null comment '租户编码',
  tenant_domain          varchar(256)           not null comment '租户域名',
  tenant_contact         varchar(32)            not null comment '租户联系人',
  tenant_contact_phone   varchar(32)            not null comment '租户联系电话',
  tenant_contact_email   varchar(32)            not null comment '租户联系邮箱',
  tenant_contact_address varchar(256)           null comment '租户联系地址',
  tenant_logo            varchar(256)           not null comment '租户logo',
  tenant_type            varchar(32)            default null comment '租户类型',
  tenant_desc                   varchar(256)           null comment '备注',
   `status`      char(1)      NOT NULL DEFAULT 0 COMMENT '状态（0正常 1停用）',
  `order_no` int NOT NULL DEFAULT 0 COMMENT '排序',
  `pinyin_code` varchar(32)   DEFAULT NULL COMMENT '拼音码',
  `wubi_code` varchar(32)   DEFAULT NULL COMMENT '五笔码',
  `create_by` varchar(32)   DEFAULT NULL COMMENT '创建人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32)   DEFAULT NULL COMMENT '修改人',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `delete_flag` char(1)   DEFAULT 0 COMMENT '删除状态'
)
  comment '租户管理' collate = utf8mb4_bin;

BEGIN;
INSERT INTO `sys_tenant` (`tenant_id`, `tenant_name`, `tenant_code`, `tenant_domain`, `tenant_contact`, `tenant_contact_phone`, `tenant_contact_email`, `tenant_contact_address`, `tenant_logo`, `tenant_type`, `tenant_desc`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`) VALUES ('1909266774261960705', '企安科技', 'QA', 'http://elsff.cn/', '曾先生', '109999999', 'system@elsff.cn', '北京市西城区测试街道测试小区cs单元101', 'http://elsff.cn/log.png', NULL, NULL, 'QAKJ', 'WPTR', 'admin', '2025-04-07 23:27:26', 'admin', '2025-04-07 23:27:26', '0');
COMMIT;

-- ----------------------------
-- Table structure for sys_dept_menu
-- ----------------------------
DROP TABLE IF EXISTS sys_dept_menu;
create table sys_dept_menu
(
  dept_id   varchar(32)             not null comment '部门ID',
  menu_id   varchar(32)             not null comment '菜单ID',
  tenant_id varchar(32) default '0' not null comment '租户id',
  primary key (dept_id, menu_id, tenant_id)
)
  comment '部门菜单' collate = utf8mb4_bin;


-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config`
(
  `config_id`    varchar(32) NOT NULL COMMENT '配置ID',
  `config_key`   varchar(32) NOT NULL COMMENT ' 配置键',
  `config_name`  varchar(32) NOT NULL COMMENT '配置名称',
  `config_value` varchar(32) NOT NULL COMMENT '配置值',
  `config_type`  varchar(32) NOT NULL COMMENT '配置类型',
  `remark`       varchar(256)         DEFAULT NULL COMMENT '备注',
  `order_no`     int         NOT NULL DEFAULT '0' COMMENT '排序',
  `pinyin_code`  varchar(32)          DEFAULT NULL COMMENT '拼音码',
  `wubi_code`    varchar(32)          DEFAULT NULL COMMENT '五笔码',
  `create_by`    varchar(32)          DEFAULT NULL COMMENT '创建人',
  `create_at`    datetime             DEFAULT NULL COMMENT '创建时间',
  `update_by`    varchar(32)          DEFAULT NULL COMMENT '修改人',
  `update_at`    datetime             DEFAULT NULL COMMENT '修改时间',
  `delete_flag`  char(1)              DEFAULT '0' COMMENT '删除状态',
  `tenant_id`    varchar(32)          DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`config_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin COMMENT ='配置管理';

BEGIN;
INSERT INTO `sys_config` (`config_id`, `config_key`, `config_name`, `config_value`, `config_type`, `remark`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1908914666614530050', 'demo', '测试', 'demo', '1', '测试', 0, 'CS', 'IY', 'admin', '2025-04-07 00:08:17', 'admin', '2025-04-07 03:06:34', '0', '0');
INSERT INTO `sys_config` (`config_id`, `config_key`, `config_name`, `config_value`, `config_type`, `remark`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1908943328009187329', 'ENABLE_ROLE_MENU', '启用角色菜单', '1', '0', '1 启用 0 禁用', 0, 'QYJSCD', 'YEQQAU', 'admin', '2025-04-07 02:02:11', 'admin', '2025-04-07 03:06:31', '0', '0');
INSERT INTO `sys_config` (`config_id`, `config_key`, `config_name`, `config_value`, `config_type`, `remark`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1908954137183596545', 'ENABLE_DEPT_MENU', '启用部门菜单', '1', '0', '1 启用 0 禁用', 0, 'QYBMCD', 'YEUUAU', 'admin', '2025-04-07 02:45:08', 'admin', '2025-04-07 03:06:28', '0', '0');
INSERT INTO `sys_config` (`config_id`, `config_key`, `config_name`, `config_value`, `config_type`, `remark`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1909662442084302850', 'ENABLE_USER_MENU', '开启用户菜单', '12', '0', '单独配置用户的菜单，不是部门或者角色配置的', 0, 'KQYHCD', 'GYEYAU', 'admin', '2025-04-09 01:39:41', 'admin', '2025-04-09 02:03:32', '0', '0');
COMMIT;

DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu`
(
  `role_id`   varchar(32) NOT NULL COMMENT '角色ID',
  `menu_id`   varchar(32) NOT NULL COMMENT '菜单ID',
  `tenant_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`role_id`, `menu_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin COMMENT ='角色菜单';

BEGIN;
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1904960886332121090', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1904963087666438146', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1904963524960378881', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1904964341289377794', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1904964771977289730', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1905286403015036930', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1905286752295702530', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1905286911305961473', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1905289514605596674', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1906496908169781250', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1906497126877569026', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903923413530570753', '1906497949288308738', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903924032509177858', '1905289514605596674', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903924093565661186', '1905286403015036930', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903924093565661186', '1905286752295702530', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903924564846047233', '1904960886332121090', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903924564846047233', '1904963087666438146', '0');
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`, `tenant_id`) VALUES ('1903924564846047233', '1904963524960378881', '0');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role`
(
  `user_id`   varchar(32) NOT NULL COMMENT '用户ID',
  `role_id`   varchar(32) NOT NULL COMMENT '角色ID',
  `tenant_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`user_id`, `role_id`, `tenant_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin COMMENT ='角色用户';
BEGIN;
INSERT INTO `sys_user_role` (`user_id`, `role_id`, `tenant_id`) VALUES ('1817648592181267201', '1903923413530570753', '0');
INSERT INTO `sys_user_role` (`user_id`, `role_id`, `tenant_id`) VALUES ('1817648592181267201', '1903924093565661186', '0');
INSERT INTO `sys_user_role` (`user_id`, `role_id`, `tenant_id`) VALUES ('1905900734593294337', '1903924564846047233', '0');
COMMIT;
-- ----------------------------
-- Table structure for sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_post`;
CREATE TABLE `sys_user_post`
(
  `user_id`   varchar(32) NOT NULL COMMENT '用户ID',
  `post_id`   varchar(32) NOT NULL COMMENT '职位ID',
  `tenant_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`user_id`, `post_id`, `tenant_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin COMMENT ='用户职位关系';

BEGIN;
INSERT INTO `sys_user_post` (`user_id`, `post_id`, `tenant_id`) VALUES ('1817648592181267201', '1902742444937084930', '0');
INSERT INTO `sys_user_post` (`user_id`, `post_id`, `tenant_id`) VALUES ('1905900734593294337', '1902742444937084930', '0');
INSERT INTO `sys_user_post` (`user_id`, `post_id`, `tenant_id`) VALUES ('1905901195421474817', '1902741825518075906', '0');
COMMIT;


-- ----------------------------
-- Table structure for sys_user_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_dept`;
CREATE TABLE `sys_user_dept`
(
  `user_id`   varchar(32) NOT NULL COMMENT '用户ID',
  `dept_id`   varchar(32) NOT NULL COMMENT '部门ID',
  `tenant_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '租户id',
  PRIMARY KEY (`user_id`, `dept_id`, `tenant_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin COMMENT ='用户部门关系';

BEGIN;
INSERT INTO `sys_user_dept` (`user_id`, `dept_id`, `tenant_id`) VALUES ('1817648592181267201', '1903363484398776322', '0');
INSERT INTO `sys_user_dept` (`user_id`, `dept_id`, `tenant_id`) VALUES ('1905900734593294337', '1903368390966898690', '0');
INSERT INTO `sys_user_dept` (`user_id`, `dept_id`, `tenant_id`) VALUES ('1905901195421474817', '1903363235735269378', '0');
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`
(
  `user_id`     varchar(32) NOT NULL COMMENT '用户ID',
  `username`    varchar(32) NOT NULL COMMENT '用户名',
  `nickname`    varchar(32) NOT NULL COMMENT '昵称',
  `sex`         int                  DEFAULT NULL COMMENT '性别',
  `birthday`    datetime             DEFAULT NULL COMMENT '生日',
  `password`    varchar(256)         DEFAULT NULL COMMENT '密码',
  `avatar`      varchar(1024)        DEFAULT NULL COMMENT '头像',
  `email`       varchar(256)         DEFAULT NULL COMMENT '邮箱',
  `phone`       varchar(11)          DEFAULT NULL COMMENT '手机号',
  `status`      char(1)      NOT NULL DEFAULT 0 COMMENT '状态（0正常 1停用）',
  `pinyin_code` varchar(32)   DEFAULT NULL COMMENT '拼音码',
  `wubi_code` varchar(32)   DEFAULT NULL COMMENT '五笔码',
  `create_by` varchar(32)   DEFAULT NULL COMMENT '创建人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32)   DEFAULT NULL COMMENT '修改人',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `delete_flag` char(1)   DEFAULT 0 COMMENT '删除状态',
  `tenant_id` varchar(32)   DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`user_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin COMMENT ='用户管理';

BEGIN;
INSERT INTO `sys_user` (`user_id`, `username`, `nickname`, `sex`, `birthday`, `password`, `avatar`, `email`, `phone`, `status`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1817648592181267201', 'admin', '管理员', 1, '2025-03-29 00:00:00', '{bcrypt}$2a$10$0INtS9wxpbmvMrYSWNWqhOB90UppvT3YstBz5eZLzzFjfFlJcSEY2', NULL, '23@qq.com', '13212341234', '0', 'GLY', 'TGK', NULL, '2025-03-29 16:32:34', 'admin', '2025-03-29 21:37:08', '0', '0');
INSERT INTO `sys_user` (`user_id`, `username`, `nickname`, `sex`, `birthday`, `password`, `avatar`, `email`, `phone`, `status`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1905900734593294337', 'user1', '用户1号', 1, '2025-03-30 00:00:00', '{bcrypt}$2a$10$Xj80EX6xa00AgPGXEEOp7.8SVq7SQK9NEfXlQfFT/KHWLwhOEiTBC', NULL, 'user1@elsfs.org', '13212341235', '0', 'YH1H', 'EY1K', 'admin', '2025-03-29 16:32:00', 'admin', '2025-03-29 23:56:55', '0', '0');
INSERT INTO `sys_user` (`user_id`, `username`, `nickname`, `sex`, `birthday`, `password`, `avatar`, `email`, `phone`, `status`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1905901195421474817', 'user2', '用户二号', 0, '2025-03-03 00:00:00', '{bcrypt}$2a$10$jD/7VUUdaN9h5N.RWt098uKG0waANMSGVsa3UgRsU7fyId7RUDUBy', NULL, 'user2@elsfs.org', '13212341236', '0', 'YHEH', 'EYFK', 'admin', '2025-03-29 16:33:50', 'admin', '2025-03-29 23:56:27', '0', '0');
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
create table sys_menu
(
  menu_id       varchar(32)           not null comment '菜单id',
  parent_id     varchar(32)           null comment '父级菜单ID',
  menu_name     varchar(50)           null comment '菜单名称',
  route_path    varchar(256)          null comment '路由地址',
  icon          varchar(256)          null comment '图标',
  component     varchar(256)          null comment '组件',
  is_show       tinyint(1)  default 1 null comment '是否显示',
  keep_alive    tinyint(1)  default 1 null comment '是否缓存',
  is_ext        tinyint(1)  default 0 null comment '是否外链',
  type          varchar(32)           not null comment '菜单类型，0目录，1菜单，2按钮',
  `status`      char(1)               NOT NULL DEFAULT 0 COMMENT '状态（0正常 1停用）',
  `order_no`    int                   NOT NULL DEFAULT 0 COMMENT '排序',
  `pinyin_code` varchar(32) DEFAULT NULL COMMENT '拼音码',
  `wubi_code`   varchar(32) DEFAULT NULL COMMENT '五笔码',
  `create_by`   varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_at`   datetime    DEFAULT NULL COMMENT '创建时间',
  `update_by`   varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_at`   datetime    DEFAULT NULL COMMENT '修改时间',
  `delete_flag` char(1)     DEFAULT 0 COMMENT '删除状态',
  `tenant_id`   varchar(32) DEFAULT '0' COMMENT '租户ID',
  primary key (`menu_id`)
) comment '菜单管理' collate = utf8mb4_bin;

BEGIN;
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1904960886332121090', '0', '仪表板', '/analytics', 'ion:layers-outline', 'BasicLayout', 1, 1, 0, '0', '0', 1, 'YBB', 'WGS', 'admin', '2025-03-27 02:17:22', 'admin', '2025-03-27 04:01:11', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1904963087666438146', '1904960886332121090', '分析', '/dashboard/analysis', 'ant-design:account-book-outlined', '/dashboard/analytics/index', 1, 1, 0, '1', '0', 1, 'FX', 'WS', 'admin', '2025-03-27 02:26:07', 'admin', '2025-03-27 04:01:38', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1904963524960378881', '1904960886332121090', '工作台', '/dashboard/workbench', 'svg:avatar-4', '/dashboard/workspace/index', 1, 1, 0, '1', '0', 1, 'GZT', 'AWC', 'admin', '2025-03-27 02:27:52', 'admin', '2025-03-27 04:01:33', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1904964341289377794', '0', '系统管理', '/system', 'bx:bx-home', 'BasicLayout', 1, 1, 0, '0', '0', 1, 'XTGL', 'TXTG', 'admin', '2025-03-27 02:31:06', 'admin', '2025-03-27 04:01:19', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1904964771977289730', '1904964341289377794', '菜单管理', '/system/menu', 'svg:avatar-3', '/system/menu/index', 1, 1, 0, '1', '0', 1, 'CDGL', 'AUTG', 'admin', '2025-03-27 02:32:49', 'admin', '2025-03-27 04:01:19', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1905286403015036930', '1904964341289377794', '职位管理', '/system/SysPost', NULL, '/system/SysPost/index', 1, 1, 0, '1', '0', 1, 'ZWGL', 'BWTG', 'admin', '2025-03-27 23:50:52', 'admin', '2025-03-27 23:51:25', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1905286752295702530', '1904964341289377794', '角色管理', '/system/role', NULL, '/system/role/index', 1, 1, 0, '1', '0', 2, 'JSGL', 'QQTG', 'admin', '2025-03-27 23:52:15', 'admin', '2025-03-27 23:54:11', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1905286911305961473', '1904964341289377794', '部门管理', '/system/dept', NULL, '/system/dept/index', 1, 1, 0, '1', '0', 2, 'BMGL', 'UUTG', 'admin', '2025-03-27 23:52:53', 'admin', '2025-03-27 23:52:53', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1905289514605596674', '1904964341289377794', '账号管理', '/system/user', NULL, '/system/user/index', 1, 1, 0, '1', '0', 1, 'ZHGL', 'MKTG', 'admin', '2025-03-28 00:03:14', 'admin', '2025-03-28 00:03:14', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1906496908169781250', '0', '运维平台', '/devops', NULL, 'BasicLayout', 1, 1, 0, '0', '0', 1, 'YWPT', 'FXGC', 'admin', '2025-03-31 08:00:59', 'admin', '2025-03-31 08:00:59', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1906497126877569026', '1906496908169781250', '字典管理', '/cms/dict', NULL, '/devOps/dict/index', 1, 1, 0, '1', '0', 1, 'ZDGL', 'PMTG', 'admin', '2025-03-31 08:01:51', 'admin', '2025-03-31 08:01:51', '0', '0');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `menu_name`, `route_path`, `icon`, `component`, `is_show`, `keep_alive`, `is_ext`, `type`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1906497949288308738', '1906496908169781250', '配置参数管理', '/devOps/config', NULL, '/devOps/config/index', 1, 1, 0, '1', '0', 1, 'PZCSGL', 'SLCOTG', 'admin', '2025-03-31 08:05:07', 'admin', '2025-03-31 08:05:07', '0', '0');
COMMIT;
-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE sys_role
(
  role_id       varchar(32)           NOT NULL COMMENT '角色ID',
  role_name     varchar(50)           NULL COMMENT '角色名称',
  role_code     varchar(128)          NULL COMMENT '角色编码',
  role_desc     varchar(256)          NULL COMMENT '角色描述',
  `status`      char(1)     DEFAULT 0 NOT NULL COMMENT '状态（0正常 1停用）',
  `order_no`    int         DEFAULT 0 NOT NULL COMMENT '排序',
  `pinyin_code` varchar(32) DEFAULT NULL COMMENT '拼音码',
  `wubi_code`   varchar(32) DEFAULT NULL COMMENT '五笔码',
  `create_by`   varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_at`   datetime    DEFAULT NULL COMMENT '创建时间',
  `update_by`   varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_at`   datetime    DEFAULT NULL COMMENT '修改时间',
  `delete_flag` char(1)     DEFAULT 0 COMMENT '删除状态',
  `tenant_id`   varchar(32) DEFAULT '0' COMMENT '租户ID',
  primary key (`role_id`)
)
  comment '角色管理';
BEGIN;
INSERT INTO `sys_role` (`role_id`, `role_name`, `role_code`, `role_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903923413530570753', '超级管理员', 'administrator', '超级管理员', '0', 1, 'CJGLY', 'FXTGK', 'admin', '2025-03-23 08:34:50', 'admin', '2025-03-25 22:59:33', '0', '0');
INSERT INTO `sys_role` (`role_id`, `role_name`, `role_code`, `role_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903924032509177858', '财务', 'finance', NULL, '0', 100, 'CW', 'MT', 'admin', '2025-03-23 08:34:50', 'admin', '2025-03-25 22:59:31', '0', '0');
INSERT INTO `sys_role` (`role_id`, `role_name`, `role_code`, `role_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903924093565661186', '测试', 'test', '测试角色', '0', 9999, 'CS', 'IY', 'admin', '2025-03-23 08:34:50', 'admin', '2025-03-25 23:11:08', '0', '0');
INSERT INTO `sys_role` (`role_id`, `role_name`, `role_code`, `role_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903924564846047233', '管理员', 'admin', NULL, '0', 2, 'GLY', 'TGK', 'admin', '2025-03-24 08:34:50', 'admin', '2025-03-24 08:34:50', '0', '0');
COMMIT;


-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE sys_dept
(
  dept_id       varchar(32)  NOT NULL COMMENT '部门ID',
  parent_id     varchar(32)  NULL COMMENT '父级部门ID',
  dept_name     varchar(50)  NULL COMMENT '部门名称',
  org_code      varchar(32)  NULL COMMENT '部门代码',
  org_category  int          NULL COMMENT '部门类型',
  mobile        varchar(128) NULL COMMENT '部门电话',
  address       varchar(256) NULL COMMENT '部门地址',
  dept_desc     varchar(256) NULL COMMENT '备注',
  `status`      char(1)      NOT NULL DEFAULT 0 COMMENT '状态（0正常 1停用）',
  `order_no`    int          NOT NULL DEFAULT 0 COMMENT '排序',
  `pinyin_code` varchar(32)           DEFAULT NULL COMMENT '拼音码',
  `wubi_code`   varchar(32)           DEFAULT NULL COMMENT '五笔码',
  `create_by`   varchar(32)           DEFAULT NULL COMMENT '创建人',
  `create_at`   datetime              DEFAULT NULL COMMENT '创建时间',
  `update_by`   varchar(32)           DEFAULT NULL COMMENT '修改人',
  `update_at`   datetime              DEFAULT NULL COMMENT '修改时间',
  `delete_flag` char(1)               DEFAULT 0 COMMENT '删除状态',
  `tenant_id`   varchar(32)           DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`dept_id`)
)
  comment '部门管理';
BEGIN;
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903362923901349889', '0', '行政中心', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'XZZX', 'TGKN', 'admin', '2025-03-22 16:27:38', 'admin', '2025-03-22 16:27:38', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903362997133897729', '0', '技术中心', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'JSZX', 'RSKN', 'admin', '2025-03-22 16:27:56', 'admin', '2025-03-22 16:27:56', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903363063101911041', '0', '营销中心', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'YXZX', 'AQKN', 'admin', '2025-03-22 16:28:12', 'admin', '2025-03-22 16:28:12', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903363205993459714', '1903362923901349889', '财务部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'CWB', 'MTU', 'admin', '2025-03-22 16:28:00', 'admin', '2025-03-22 16:28:00', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903363235735269378', '1903362923901349889', '人事部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'RSB', 'WGU', 'admin', '2025-03-22 16:28:00', 'admin', '2025-03-22 16:28:00', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903363435082149890', '1903362997133897729', '实施部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'SSB', 'PYU', 'admin', '2025-03-22 16:29:40', 'admin', '2025-03-22 16:29:40', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903363484398776322', '1903362997133897729', '产品部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'CPB', 'UKU', 'admin', '2025-03-22 16:29:52', 'admin', '2025-03-22 16:29:52', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903363739001417730', '1903362997133897729', '测试部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'CSB', 'IYU', 'admin', '2025-03-22 16:30:53', 'admin', '2025-03-22 16:30:53', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903363796165586946', '1903362997133897729', '研发部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'YFB', 'DNU', 'admin', '2025-03-22 16:31:06', 'admin', '2025-03-22 16:31:06', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903368390966898690', '1903363796165586946', '研发1组', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'YF1Z', 'DN1X', 'admin', '2025-03-22 16:49:22', 'admin', '2025-03-22 16:49:22', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903368508180918273', '1903363796165586946', '研发2组', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'YF2Z', 'DN2X', 'admin', '2025-03-22 16:49:50', 'admin', '2025-03-22 16:49:50', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903368576980086786', '1903363796165586946', '研发3组', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'YF3Z', 'DN3X', 'admin', '2025-03-22 16:50:06', 'admin', '2025-03-22 16:50:06', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903368660484485121', '1903363063101911041', '营销部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'YXB', 'AQU', 'admin', '2025-03-22 16:50:26', 'admin', '2025-03-22 16:50:26', '0', '0');
INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_name`, `org_code`, `org_category`, `mobile`, `address`, `dept_desc`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1903368702242975746', '1903363063101911041', '客服部', NULL, NULL, NULL, NULL, NULL, '0', 9999, 'KFB', 'PEU', 'admin', '2025-03-22 16:50:36', 'admin', '2025-03-22 16:50:36', '0', '0');
COMMIT;



-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post`
(
  `post_id`     varchar(32) NOT NULL COMMENT 'ID',
  `post_code`   varchar(32) NOT NULL COMMENT '岗位编码',
  `post_name`   varchar(32) NOT NULL COMMENT '岗位名称',
  `post_rank`   varchar(32) NOT NULL COMMENT '职级',
  `remark`      varchar(256)         DEFAULT NULL COMMENT '备注',
  `status`      char(1)     NOT NULL DEFAULT 0 COMMENT '状态（0正常 1停用）',
  `order_no`    int         NOT NULL DEFAULT 0 COMMENT '排序',
  `pinyin_code` varchar(32)          DEFAULT NULL COMMENT '拼音码',
  `wubi_code`   varchar(32)          DEFAULT NULL COMMENT '五笔码',
  `create_by`   varchar(32)          DEFAULT NULL COMMENT '创建人',
  `create_at`   datetime             DEFAULT NULL COMMENT '创建时间',
  `update_by`   varchar(32)          DEFAULT NULL COMMENT '修改人',
  `update_at`   datetime             DEFAULT NULL COMMENT '修改时间',
  `delete_flag` char(1)              DEFAULT 0 COMMENT '删除状态',
  `tenant_id`   varchar(32)          DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`post_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin COMMENT ='岗位管理';

BEGIN;
INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_rank`, `remark`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1902741506717417474', 'DIRECTORS', '董事高管', '1', NULL, '0', 1, 'DSGG', 'AGYT', 'admin', '2025-03-20 23:18:21', 'admin', NULL, '0', '0');
INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_rank`, `remark`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1902741825518075906', 'HR_MANAGER', '人事经理', '2', NULL, '0', 3, 'RSJL', 'WGXG', 'admin', '2025-03-20 23:19:37', 'admin', NULL, '0', '0');
INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_rank`, `remark`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1902742444937084930', 'FINANCE_MANAGER', '财务经理', '2', NULL, '0', 2, 'CWJL', 'MTXG', 'admin', '2025-03-20 23:22:05', 'admin', NULL, '0', '0');
INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_rank`, `remark`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1902742996202848258', 'R&D_PERSONNEL', '研发人员', '3', NULL, '0', 9999, 'YFRY', 'DNWK', 'admin', '2025-03-20 23:24:16', 'admin', NULL, '0', '0');
INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_rank`, `remark`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1902743157553528833', 'TESTER', '测试人员', '3', NULL, '0', 9999, 'CSRY', 'IYWK', 'admin', '2025-03-20 23:24:55', 'admin', NULL, '0', '0');
INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_rank`, `remark`, `status`, `order_no`, `pinyin_code`, `wubi_code`, `create_by`, `create_at`, `update_by`, `update_at`, `delete_flag`, `tenant_id`) VALUES ('1902743322049937409', 'DEPT_HEAD', '部门负责人', '2', NULL, '0', 4, 'BMFZR', 'UUQGW', 'admin', '2025-03-20 23:25:34', 'admin', NULL, '0', '0');
COMMIT;
